﻿@Html.Raw(Netnr.SharedApp.QuoteTo.Html("the"))
<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />

    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />

    <title>@ViewData["Title"]</title>

    @Html.Raw(Netnr.SharedApp.QuoteTo.Html("favicon,blog-seo,bootstrap.css,fa.css,jquery.js,bootstrap.js,jz.js"))

    <link href="/areas/doc/css/global.css" rel="stylesheet" asp-append-version="true" />

</head>
<body>
    @{
        var hc = ViewContext.HttpContext;
        bool IsLogin = hc.User.Identity.IsAuthenticated;
        var currurl = hc.Request.Path;

        string ca = ViewContext.RouteData.Values["controller"].ToString().ToLower();
        var canav = new List<string>() { "code" };
    }

    <partial name="_PartialQuote" model="@("MirrorReadOnly")" />

    @if (!canav.Contains(ca))
    {
        <div class="container-fluid ndnav">
            <div class="row mt-3 mb-5">
                <div class="col-8">
                    <a href="/doc" class="d-none d-sm-block mr-4 float-left">
                        <i class="fa fa-fw fa-book fa-2x"></i> <b class="h3"><b>@GlobalTo.GetValue("Common:EnglishName")</b> Doc</b>
                    </a>
                    <a href="/doc/discover" class="mr-4 mt-2 float-left text-nowrap"><i class="fa fa-fw fa-file-text"></i>Discover</a>
                    <a href="/" class="mt-2 float-left text-nowrap"><i class="fa fa-fw fa-home"></i>@GlobalTo.GetValue("Common:EnglishName")</a>
                </div>
                <div class="col-4">
                    @if (IsLogin)
                    {
                        var uinfo = Netnr.Blog.Web.Apps.LoginService.Get(ViewContext.HttpContext);

                        <div class="btn-group float-right mt-2">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                <i class="fa fa-user-circle"></i>
                            </a>
                            <div class="dropdown-menu dropdown-menu-right">
                                <h6 class="dropdown-header">
                                    Signed in as <b>@uinfo.Nickname</b>
                                </h6>
                                <div class="dropdown-divider"></div>
                                <a class="dropdown-item" href="/doc/user/@uinfo.UserId"><i class="fa fa-fw fa-book"></i> Your doc</a>
                                <a class="dropdown-item" href="/user/id/@uinfo.UserId"><i class="fa fa-fw fa-user"></i> Your profile</a>
                                <div class="dropdown-divider"></div>
                                <a class="dropdown-item" href="/user/setting"><i class="fa fa-fw fa-cog"></i> Settings</a>
                                <a class="dropdown-item" href="/account/logout/doc"><i class="fa fa-fw fa-power-off"></i> Sign out</a>
                            </div>
                        </div>

                        <a class="float-right mt-2 mr-3" href='/doc/item/add'>
                            <i class="fa fa-plus"></i>
                        </a>
                    }
                    else
                    {
                        <a class="float-right mt-2" href="/account/login?ReturnUrl=@currurl">
                            <i class="fa fa-user"></i> Sign
                        </a>
                    }
                </div>
            </div>
        </div>
    }

    @RenderBody()

    <partial name="_PartialQuote" model="@("fun.js")" />
</body>
</html>